home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / slatex / optchez.ss < prev    next >
Text File  |  1993-11-07  |  852b  |  33 lines

  1. ;optchez.ss
  2. ;SLaTeX Version 1.99
  3. ;Optimizing for Chez 4.0a
  4. ;(c) Dorai Sitaram, December 1991, Rice University
  5.  
  6. '(enable chez)
  7. (eval-when (compile load eval)
  8.   (if (bound? 'optimize-level) 'skip ;else code only for old Chezs
  9.     (let ((cwif call-with-input-file)
  10.       (cwof call-with-output-file))
  11.       (set! call-with-input-file
  12.     (lambda (f p)
  13.       (cwif f (lambda (pt)
  14.             (p pt)
  15.             (close-input-port pt)))))
  16.       (set! call-with-output-file
  17.     (lambda (f p)
  18.       (cwof f (lambda (pt)
  19.             (p pt)
  20.             (close-output-port pt))))))))
  21.  
  22. '(enable chez)
  23. (if (bound? 'optimize-level) (optimize-level 3))
  24.  
  25. '(enable chez)
  26. '(eval-when (compile load eval)
  27.   (if (bound? 'waiter-prompt-and-read)
  28.       (begin
  29.        (waiter-prompt-and-read
  30.     (lambda (n)
  31.      (read (console-input-port))))
  32.        '(waiter-write (lambda (x) 'void)))))
  33.